GXNewViewDevice
You can use theGXNewViewDevice
function to create a new view device object.
gxViewDevice GXNewViewDevice (gxViewGroup group, gxShape bitmapShape);
- group
- A reference to the view group in which to create the view device.
bitmapShape
- A reference to a bitmap shape that defines the view device's imaging area.
- function result
- A reference to the newly created view device object.
DESCRIPTION
TheGXNewViewDevice
function creates a new view device object in the specified view group. ThebitmapShape
parameter references a bitmap shape whose bitmap structure specifies the height, width, and pixel depth (bits per pixel) of the device, plus any color set or color profile used by the device. The remaining properties have default values:
To obtain an offscreen view group reference to pass to this function, use the
- a clip that is a full shape
- a mapping that is the identity mapping
- no attributes set
- an empty tag list
GXNewViewGroup
function. To create a view device in the onscreen view group, pass the valuegxScreenViewDevices
for thegroup
parameter.SPECIAL CONSIDERATIONS
The bitmap shape that you pass to this function cannot not have a disk-based pixel image.If no error occurs, the
GXNewViewDevice
function creates a view device object; you are responsible for disposing of that object when you no longer need it.ERRORS, WARNINGS, AND NOTICES
Errors out_of_memory shape_is_nil invalid_viewGroup_reference illegal_type_for_shape (debugging version) SEE ALSO
For examples of the use of this function, see Listing 7-9 on page 7-53 and Listing 7-14 on page 7-63.To dispose of a view device, use the
GXDisposeViewDevice
function, described
next. To dispose of all the view devices in a view group, use theGXDisposeViewGroup
function, described on page 7-122.For information about bitmap shapes and the bitmap structure, see the bitmap shapes chapter of Inside Macintosh: QuickDraw GX Graphics.
The
GXNewViewGroup
function is described on page 7-122. ThegxScreenViewDevices
view group reference is described in the section
"View Group Types" on page 7-69.